File Directory
Php
-
Home
-
Php
-
File Directory
- File
session_register("GlimpseDir");
if(!$GlimpseDir) $GlimpseDir="/";
/* Set this directory to the physical location on your filesystem for
the document root. */
$basedir="/usr/httpd/html/glimpse";
function reloadnow() {
global $PHP_SELF;
global $addons;
header("Status: 302 Moved");
header("Location: $PHP_SELF".$addons);
exit(); }
if($cancel) $action="";
if($action=="root") $GlimpseDir="/";
if($action=="chdr") $GlimpseDir=$file."/";
if($action=="dele" && $confirm==1) { unlink($basedir.$file); $action="";}
if($action=="move" && $confirm && $newfile) {
rename($basedir.$file,$basedir.$newfile); $action=""; }
if($action=="rmdr") rmdir($basedir.$file);
if($action=="edit" && $confirm && $file) {
$fp=fopen($basedir.$file,"w");
fputs($fp,stripslashes($code));
fclose($fp);
$addons="?action=edit&file=".rawurlencode($file);
reloadnow(); }
if($upload) { copy($userfile,$basedir.$GlimpseDir.$userfile_name);
reloadnow(); }
if($touch) { touch($basedir.$GlimpseDir.$touchfile); reloadnow(); }
if($mkdir) { mkdir($basedir.$GlimpseDir.$mkdirfile,0700); reloadnow(); }
?>
Filesystem Browser-Current Directory="=$GlimpseDir;?>"
if ($action=="dele") {
echo "Are you sure you want to delete $file ?
";
echo "YES
";
echo "NO
";
echo "";
exit(); }
if ($action=="move") {
echo "Current Filename is: ".$file . "
\n";
echo "